package com.bw.cement.adapter

import com.bw.cement.R
import com.bw.cement.entity.CementEntity
import com.bw.common.vm.BaseViewModel
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class CementAdapter:BaseMultiItemQuickAdapter<CementEntity,BaseViewHolder>() {

    init {
        addItemType(0, R.layout.item_cement_s)
        addItemType(1, R.layout.item_cement_a)
        addItemType(2, R.layout.item_cement_h)
    }

    override fun convert(holder: BaseViewHolder, item: CementEntity) {
        holder.setText(R.id.tv_title,item.title)
        holder.setText(R.id.tv_time,item.publishTime)
        holder.setText(R.id.tv_content,item.content)
        holder.setText(R.id.tv_btn,item.status)
    }
}